package com.ghck.server.dao.provider;

import java.util.Map;

import com.ghck.server.model.Maker;

public class MakerMapperProvider {

	public String listMakers(Map<String, Object> params){
		StringBuffer sb = new StringBuffer();
		sb.append("select * from t_maker where 1=1");
		Maker maker = (Maker) params.get("maker");
		if(maker.getStatus() != null){
			sb.append(" and status=#{maker.status}");
		}
		sb.append("  order by last_modify_time desc limit #{start},#{limit}");
		return sb.toString();
	}
	
	public String countListMakers(Map<String, Object> params){
		StringBuffer sb = new StringBuffer();
		sb.append("select count(*) from t_maker where 1=1");
		Maker maker = (Maker) params.get("maker");
		if(maker.getStatus() != null){
			sb.append(" and status=#{maker.status}");
		}
		return sb.toString();
	}
}
